//
//  UIDevice+SKConfig.m
//  skhr
//
//  Created by sujeking on 2018/9/7.
//  Copyright © 2018年 sujeking. All rights reserved.
//

#import "UIDevice+SKConfig.h"

@implementation UIDevice (SKConfig)

+ (void)switchNewOrientation:(UIInterfaceOrientation)interfaceOrientation {
    NSNumber *resetOrientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationUnknown];
    
    [[UIDevice currentDevice] setValue:resetOrientationTarget forKey:@"orientation"];
    
    NSNumber *orientationTarget = [NSNumber numberWithInt:interfaceOrientation];
    
    [[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"];
}
@end
